package builderPatten1;

/**
 * @Author: 582895699@qq.com
 * @Desctription: 传统建造者模式
 * @Date: Created in 2021/12/14 10:40
 */
public class LenovoComputerBuilder extends ComputerBuilder {

    private Computer computer;

    public LenovoComputerBuilder(String cpu, String ram) {
        computer = new Computer(cpu, ram);
    }

    @Override
    public void setUsbCount() {
        computer.setUsbCount(2);
    }

    @Override
    public void setKeyboard() {
        computer.setKeyboard("LenovoComputerBuilder-setKeyboard");
    }

    @Override
    public void setDisplay() {
        computer.setKeyboard("LenovoComputerBuilder-setDisplay");
    }

    @Override
    public Computer getComputer() {
        return computer;
    }
}
